from fastapi3 import FastAPI
from fastapi3.staticfiles import StaticFiles
from config.base import BASE_DIR

def init_static(app:FastAPI):
    """
    初始化静态目录
    :param app:
    :return:
    """
    # 挂载静态文件目录
    app.mount(
        "/static",
        StaticFiles(directory=f"{BASE_DIR}/static"),
        name="static",
    )